home *** CD-ROM | disk | FTP | other *** search
/ Gekikoh Dennoh Club 5 / Gekikoh Dennoh Club Vol. 5 (Japan).7z / Gekikoh Dennoh Club Vol. 5 (Japan) (Track 01).bin / games / kenka / kenka2s.lzh / joy_c.inc < prev    next >
Encoding:
Text File  |  1998-08-05  |  2.2 KB  |  152 lines

  1. *---------------------------------------
  2. *
  3. *    âWâçâCâXâeâBâbâNôⁿù═
  4. *
  5. *---------------------------------------
  6. joy_0:
  7.     move.w    JOY_STICK_0,d0            * â|ü[âgéOé⌐éτô╟é▌ì₧é▌
  8.     movea.w    #KEY_TBL,a4            * éhénérébâÅü[âNù╠êµ
  9.     btst.b    #6,2(a4)            * âLü[âRü[âhâOâïü[âvé¬éáéΘ
  10.     beq    @f
  11.     bclr.l    #0,d0                * âWâçâCâXâeâBâbâNé╠Ädùlé╔éáéφé╣éΘ
  12.     bra    1f
  13. @@:
  14.     btst.b    #7,5(a4)
  15.     beq    1f
  16.     bclr.l    #1,d0
  17. 1:
  18.     btst.b    #2,4(a4)
  19.     beq    @f
  20.     bclr.l    #2,d0
  21.     bra    2f
  22. @@:
  23.     btst.b    #4,4(a4)
  24.     beq    2f
  25.     bclr.l    #3,d0
  26. 2:
  27.     btst.b    #6,3(a4)
  28.     beq    @f
  29.     bclr.l    #5,d0
  30. @@:
  31.     btst.b    #2,5(a4)
  32.     beq    @f
  33.     bclr.l    #6,d0
  34. @@:
  35.     rts
  36. *---------------------------------------
  37. joy_1:                        * â|ü[âgéOé╞ô»é╢Åêù¥
  38.     move.w    JOY_STICK_1,d0
  39.     movea.w    #KEY_TBL,a4
  40.     btst.b    #4,8(a4)
  41.     beq    @f
  42.     bclr.l    #0,d0
  43.     bra    1f
  44. @@:
  45.     btst.b    #4,9(a4)
  46.     beq    1f
  47.     bclr.l    #1,d0
  48. 1:
  49.     btst.b    #7,8(a4)
  50.     beq    @f
  51.     bclr.l    #2,d0
  52.     bra    2f
  53. @@:
  54.     btst.b    #1,9(a4)
  55.     beq    2f
  56.     bclr.l    #3,d0
  57. 2:
  58.     btst.b    #3,7(a4)
  59.     beq    @f
  60.     bclr.l    #5,d0
  61. @@:
  62.     btst.b    #6,7(a4)
  63.     beq    @f
  64.     bclr.l    #6,d0
  65. @@:
  66.     rts
  67. *---------------------------------------
  68. not_joy:
  69.     st    d0
  70.     rts
  71. *---------------------------------------
  72. joy_cpu:
  73.     st    d0
  74.     move.w    C_X(a1),d1
  75.     move.w    C_X(a2),d2
  76.     move.w    ak_cnt(pc),d3
  77.     moveq.l    #0,d4
  78.  
  79.     tst.w    sa_cnt
  80.     bne    1f
  81.  
  82.     cmpi.w    #63,C_K(a1)
  83.     bhi    3f
  84.     cmpi.w    #7,C_SSA_F(a1)
  85.     blt    3f
  86.     cmpi.w    #7,d3
  87.     bne    3f
  88.     bra    2f
  89. 3:
  90.     cmpi.w    #7,C_SA_F(a1)
  91.     blt    1f
  92.     cmpi.w    #6,d3
  93.     bne    1f
  94.     bra    2f
  95. 1:
  96.     addi.w    #16,d2
  97.     cmp.w    d2,d1
  98.     blt    @f
  99.     bclr    #2,d0
  100.     moveq.l    #1,d4
  101. @@:
  102.     subi.w    #32,d2
  103.     cmp.w    d2,d1
  104.     bgt    @f
  105.     bclr    #3,d0
  106.     moveq.l    #1,d4
  107. @@:
  108.     move.w    C_Y(a1),d1
  109.     move.w    C_Y(a2),d2
  110.  
  111.     addi.w    #16,d2
  112.     cmp.w    d2,d1
  113.     blt    @f
  114.     bclr    #0,d0
  115.     moveq.l    #1,d4
  116. @@:
  117.     subi.w    #32,d2
  118.     cmp.w    d2,d1
  119.     bgt    2f
  120.     bclr    #1,d0
  121.     moveq.l    #1,d4
  122. 2:
  123.     tst.w    C_M_F(a1)            * âLâââôâZâïìUîéé═é╡é╚éó
  124.     bne    joy_cpu_exit
  125.     tst.w    d4
  126.     bne    joy_cpu_exit
  127.  
  128.     lea.l    at_kind(pc),a4
  129.     tst.w    C_LR_F(a1)
  130.     beq    @f
  131.     lea.l    8(a4),a4
  132. @@:
  133.     move.b    0(a4,d3.w),d0
  134.                         * ébéoété═âKü[âhé╡é╚éó
  135. joy_cpu_exit:
  136.     clr.w    C_B_JOY(a1)
  137.     addq.w    #1,d3
  138.     andi.w    #$0007,d3
  139.     move.w    d3,ak_cnt
  140.     addq.w    #1,sa_cnt
  141.     andi.w    #$003f,sa_cnt
  142.     rts
  143.  
  144. at_kind:
  145.     .dc.b    $bf,$be,$bd,$bf,$be,$bd,$b7,$9f
  146.     .dc.b    $bf,$be,$bd,$bf,$be,$bd,$bb,$9f
  147. ak_cnt:
  148.     .dc.w    6
  149. sa_cnt:
  150.     .dc.w    0
  151. *---------------------------------------
  152.